<template>
  <div>
    <div class="content content-table">
      <el-table
        ref="multipleTableRef"
        border
        :data="state.list"
        style="width: calc(100% - 20px)"
      >
        <el-table-column property="id" label="ID" width="100" align="center" />
        <el-table-column property="leixing" label="类型" align="center" />
        <!-- <el-table-column
          property="xieyineirong"
          label="协议内容"
          align="center"
        >
          <template #default="scope">
            <div v-html="scope.row.xieyineirong"></div>
          </template>
        </el-table-column> -->
        <el-table-column fixed="right" label="操作" width="200" align="center">
          <template #default="scope">
            <el-button
              style="min-width: auto"
              link
              type="primary"
              size="small"
              @click.prevent="onOperation(scope.row, 'edit')"
              >编辑</el-button
            >
          </template>
        </el-table-column>
      </el-table>
    </div>
  </div>
</template>
<script setup>
import { reactive, watch } from "vue";
import { useRoute, useRouter } from "vue-router";
import { GetPrivacyList } from "@/api/system";
import { baseMsg } from "@/utils/utils";
const route = useRoute();
const router = useRouter();
const state = reactive({
  list: [],
});
const GetList = () => {
  GetPrivacyList().then((res) => {
    if (res.code == 4201) {
      state.list = res.data;
    }
  });
};
// 操作
const onOperation = (params, operation) => {
  if (operation === "edit") {
    router.push({
      path: `/xitongshezhi/yinsixieyishezhi/info`,
      query: {
        id: params.id,
      },
    });
  }
};
GetList();
</script>
<style lang="scss" scoped>
.content {
  border: none !important;
  margin: 0 10px;
  background-color: transparent !important;
  padding-bottom: 30px;
  padding-top: 20px;
}
</style>
<style lang="scss">
.content-table .el-table__header th {
  background-color: #f2f9fc !important;
}
</style>
